﻿<UserControl x:Class="Studio77.RuneMaster.RuneItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="80" d:DesignWidth="80" IsHitTestVisible="False">
	<UserControl.Resources>
		<Storyboard x:Name="StoryboardItemSelected">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)" Storyboard.TargetName="itemImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-10"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="10"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="StoryboardImageShock">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="itemImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="3"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.06" Value="2">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut" Bounces="2"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.14" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut" Bounces="2"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-2"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.28" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="itemImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="3"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.06" Value="3">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut" Bounces="2"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.14" Value="-3">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut" Bounces="2"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.28" Value="-2">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="StoryboardAddSpriteVanish">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="itemImage">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.1">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.2">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.3">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="itemImage_outer">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.1">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.2">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.3">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="StoryboardSetSpriteRune">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="itemImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="1.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuarticEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="itemImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="1.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuarticEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="#02FFFFFF">
    	<Image x:Name="itemImage" Source="/Images/red.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
    		<Image.RenderTransform>
    			<CompositeTransform/>
    		</Image.RenderTransform>
    	</Image>
    	<Image x:Name="imgSelector" Source="/Images/selector.png" Stretch="Fill" Visibility="Collapsed"/>
    	<Image x:Name="itemImage_outer" Source="/Images/red_outer_0.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
    		<Image.RenderTransform>
    			<CompositeTransform/>
    		</Image.RenderTransform>
    	</Image>
    	<Image x:Name="imgAddSpriteFlag" Margin="0" Source="/Images/add_sprite_flag_1.png" Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Center" Width="51" Height="32" Visibility="Collapsed" RenderTransformOrigin="0.5,0.5">
    		<Image.RenderTransform>
    			<CompositeTransform ScaleX="1" ScaleY="1" TranslateX="0" TranslateY="0"/>
    		</Image.RenderTransform>
    	</Image>
    </Grid>
</UserControl>